package com.itzhoun.book;

/**
 * @author zhounan
 * @Title: 上下文
 * @Description: 上下文
 * @date 16/5/2023上午 12:14
 */
public class Client {

    public static void main(String[] args) {

        StrategyEnvironment strategyEnvironment = new StrategyEnvironment(new ComputerBook());

        System.out.println("买计算机书：" + strategyEnvironment.clac(50, 2));

        StrategyEnvironment strategyEnvironment1 = new StrategyEnvironment(new LanguageBook());
        System.out.println("买语言书：" + strategyEnvironment1.clac(50, 2));

        StrategyEnvironment strategyEnvironment2 = new StrategyEnvironment(new StoreBook());
        System.out.println("买小说：" + strategyEnvironment2.clac(50, 2));



    }
}
